package com.cjm.connect;

import com.mysql.jdbc.Driver;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;

public class test3 {
    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException {
        Class.forName("com.mysql.jdbc.Driver");
        String url = "jdbc:mysql://localhost:3306/connenct";
//
        String username = "root";
        String password = "123456";

        Connection connection = DriverManager.getConnection(url, username, password);
        System.out.println("连接方式4"+connection);
    }
}
